<template>
	<z-paging ref="paging" v-model="list" @query="getList" loading-more-default-text="我也是有底线的哦">
		<view class=" h100 mainBg ">
			<navbar title="系列课程" />
			</navbar>
			<view class="list">
				<view v-for="item,index in list" :key="item.id">
					<item :item="item" />
				</view>
			</view>
		</view>
	</z-paging>
</template>

<script>
	import item from "./components/userItemSeries.vue"
	export default {
		components: {
			item
		},
		data() {
			return {
				list: [],
				courseType:'series',
			}
		},
		methods: {
			getList(pageNo, pageSize) {
				const params = {
					courseType:this.courseType,
					pageNum: pageNo,
					pageSize:pageSize
				}
				this.$post("/user/courseList", JSON.stringify(params)).then(res => {
					//请勿在网络请求回调中给dataList赋值！！只需要调用complete就可以了
					this.$refs.paging.complete(res.data.rows);
				})
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #35CBAD;
	}
</style>